1. Field of the Invention
The method and apparatus of the present invention relate generally to bus contention in a bus architecture and specifically to the detection of bus contention by two or more bus agents.
2. Art Background
A standard bus architecture is often used for coupling optional hardware adapters to a bus of a computer system as bus agents. The optional hardware adapters, or bus agents, can be peripheral components such as disk drives, networks and graphics devices. A bus controller, which may be a processor, coupled to the standard bus configures and controls the bus agents by accessing the bus agents. Typically, the internal registers of the bus agents are mapped into an address space of the standard bus.
For computer systems using such a standard bus architecture, the internal registers for each bus agent are mapped to separate portions of the address space of the bus to prevent bus conflicts between the bus agents. Typically, a default address mapping for the bus agents are preselected by the manufacturers. It is therefore possible that two or more bus agents coupled to the bus may respond to the same address such that each agent will simultaneously attempt to drive data on the bus. Bus contention results.
Known prior art methods use bus contention to detect the existence of multiple bus agents at a single address so that the bus agents may be remapped into different address spaces. To ensure a predictable outcome for a collision where a first bus agent attempts to drive the bus high and a second bus agent attempts to drive the bus low, the standard bus architecture implements "open collector" bus driver circuits that includes an active pull-down driver and a pull-up device, e.g. a resistor or a field effect transistor (FET) coupled as a resistor. FIG. 1A shows a typical prior art open collector bus driver circuit. The bus driver circuit includes an active pull-down driver 1 that is enabled and disabled in response to the state of the input data received via signal line 3. As shown in FIG. 1B, if DATA IN is a logic 0, the active pull-down driver is enabled and pulls down the bus via signal line 4 such that DATA OUT is a logic 0. If DATA IN is a logic 1, the active pull-down driver 1 is disabled, and the bus is pulled up to VCC through the action of the pull-up resistor 2 shown in FIG. 1A. This bus driver circuit is intended to guarantee that a bus agent driving low data will always win a bus contention.
At start-up, the bus host attempts to identify each bus agent by sequentially broadcasting addresses and requesting identification information from any bus agent that will respond to the address. Typically, the amount of data placed on the bus in response to a self-identification request is sufficient to statistically guarantee that two bus agents will drive different data if contention occurs. Because the low data always wins, a protocol or other predictive method can be implemented to detect errors in the expected data stream. Thus, the existence of an unknown bus agent can be detected.
While the use of the pull-up resistor typically guarantees that the low driving bus agent will always win the contention, the pull-up resistor results in degraded bus performance because the valid data phase must be lengthened to account for the slow charge-up time of the bus. The trade-off is thus between system reliability and system speed. The bus speed can be increased by reducing the resistance of the pull-up resistor so that it will pull up the data line more quickly. Although this is an attractive solution for an individual bus agent, it can have system-wide repercussions if the bus is coupled to numerous bus agents containing small value resistors as pull-up devices. The effective resistance of the bus that is presented to a bus agent becomes very small due to the small value resistors of the bus driver circuits being in parallel. If the resistive value is too small, it may be impossible for an active pull-down driver to pull down the bus to the low voltage, leading to invalid or indeterminate data being read by the requesting bus host or agent. Furthermore, the reliability of the active pull-down driver can be degraded due to excessive current flow through it.